eloquent with select

111

eloquent with select -

Post::query()
    ->with(array('user' => function($query) {
        $query->select('id','username');
    }))
    ->get();

Comments

Submit
0 Comments